/* 
 *   Date       Developer   Description
 *   
 *
 *   Classname:  org.apache.camel.component.custom.Test
 * 
 *   Date:   2014-3-4
 * 
 *   The source code contained in this listing is proprietary to
 *   HLJ POST YITONG INFO-NET CO.,LTD.
 * 
 *   Unauthorized copying, adaptation, distribution, use, or display
 *   is strictly prohibited.
 *   This software is Copyright 2014 HLJ POST YITONG INFO-NET CO.,LTD.
 */
package com.titan.demo.camel.developers.component;

import org.apache.camel.CamelContext;
import org.apache.camel.Component;
import org.apache.camel.Exchange;
import org.apache.camel.Processor;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.impl.DefaultCamelContext;


/**
 *
 *
 * @author Administrator
 *
 */
public class Test1 {
    
    public static void main(String[] args) {
        try {
            CamelContext context = new DefaultCamelContext();
            
            Component com = new CustomComponent();
            context.addComponent("zzz", com);
            
            RouteBuilder builder = new RouteBuilder() {
                public void configure() throws Exception {
                    from("zzz:in?name=aaa").to("zzz:out");
                }
            };
            context.addRoutes(builder);
            context.start();
            Thread.sleep(2000);
            context.stop();
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
        }        
    }

}

